// https://nuxt.com/docs/api/configuration/nuxt-config
import tailwindcss from "@tailwindcss/vite";
export default defineNuxtConfig({
  app: {
    head: {
      htmlAttrs: {
        lang: "zh-CN",
      },
      meta: [
        {
          name: "viewport",
          content:
            "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",
        },
      ],
    },
  },
  // 确保 SSR 正常工作
  ssr: true,
  nitro: {
    apiBaseURL: "/newapi",
  },
  devServer: {
    host: "0.0.0.0",
    port: 3001,
  },
  modules: ["@pinia/nuxt"],
  // content: {
  //   build: {
  //     markdown: {
  //       highlight: {
  //         theme: {
  //           default: "vitesse-light",
  //           dark: "github-dark",
  //           sepia: "monokai",
  //         },
  //         langs: ["ts", "js", "css", "html", "json", "vue", "md"],
  //       },
  //       toc: {
  //         depth: 2,
  //         searchDepth: 2,
  //       },
  //     },
  //   },
  // },
  compatibilityDate: "2024-11-01",
  devtools: { enabled: true },
  css: ["~/assets/css/main.css"],
  vite: {
    plugins: [tailwindcss()],
  },
});
